﻿function CheckPassword()
{
    var prefix = "ctl00_ContentPlaceHolder1_";
    var currentpassword = document.getElementById(prefix+"txtCurrentPassword");
    var newpassword = document.getElementById(prefix + "txtNewPassword");
    var newpasswordconfirm = document.getElementById(prefix + "txtNewPasswordConfirm");

    if (currentpassword.value.length == 0)
    {
        alert("请输入原密码！");
        currentpassword.focus();
        return false;
    }
    if (newpassword.value.length == 0)
    {
        alert("请输入新密码！");
        newpassword.focus();
        return false;
    }
    if (newpasswordconfirm.value.length == 0)
    {
        alert("请输入确认密码！");
        newpasswordconfirm.focus();
        return false;
    }
    if (newpassword.value != newpasswordconfirm.value)
    {
        alert("确认密码不同！");
        newpasswordconfirm.focus();
        return false;
    }
    return true;
}

